import request from '@/utils/request'

// 获取经纪列表
export function getMangerList(params) {
  return request.get('/agents', { params })
}

// 获取经纪数量
export function getLisyNum(params) {
  return request.get('/agents/count', { params })
}

// 新增经纪
export function addManager(data) {
  return request.post('/agents', data)
}

// 删除经纪
export function deleteManger(id) {
  return request.delete(`/agents/${id}`)
}

// 更新经纪
export function updateManger(data) {
  return request.put(`/agents/${data.id}`, data)
}

// 根据id获取经纪详情
export function getDetailById(id) {
  return request.get('/agents/' + id)
}
